package com.huluobo.high3videoproject.adapter;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.high3videoproject.R;
import com.huluobo.high3videoproject.bean.GiftBeanResult;
import com.huluobo.high3videoproject.utils.GlideUtils;

import java.util.List;

public class GiftAdapter extends BaseQuickAdapter<GiftBeanResult.GiftBean, BaseViewHolder> {
    public GiftAdapter(@Nullable List<GiftBeanResult.GiftBean> data) {
        super(R.layout.item_gift, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, GiftBeanResult.GiftBean giftBean) {
        ImageView giftView = baseViewHolder.getView(R.id.item_iv_gift_icon);
        GlideUtils.load(getContext(), giftView, giftBean.getGiftpath(), 0, 0, 5);
        baseViewHolder.setText(R.id.item_tv_gift_price, giftBean.getPrice() + "抖币");
    }
}
